#if !defined(FAKE_D3D11_DEVICE_H)
#define FAKE_D3D11_DEVICE_H

#include <exception>
#include <d3d11.h>
#include "FakeUnknown.h"

class FakeD3D11Device : public ID3D11Device
{
public:
	FakeD3D11Device()
		: CreateComputeShaderCalled(false),
		CreateComputeShaderLastByteCode(0),
		CreateComputeShaderLastByteCodeLength(0),
		CreateComputeShaderLastClassLinkage(0),
		CreateComputeShaderFakeResult(0),
		CreateComputeShaderFakeHResult(E_FAIL)
	{
	}
	virtual ~FakeD3D11Device() { }

	FAKE_UNKNOWN_IMPL(Unknown);

	virtual HRESULT STDMETHODCALLTYPE CreateBuffer( 
		__in  const D3D11_BUFFER_DESC *pDesc,
		__in_opt  const D3D11_SUBRESOURCE_DATA *pInitialData,
		__out_opt  ID3D11Buffer **ppBuffer)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE CreateTexture1D( 
		__in  const D3D11_TEXTURE1D_DESC *pDesc,
		__in_xcount_opt(pDesc->MipLevels * pDesc->ArraySize)  const D3D11_SUBRESOURCE_DATA *pInitialData,
		__out_opt  ID3D11Texture1D **ppTexture1D)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE CreateTexture2D( 
		__in  const D3D11_TEXTURE2D_DESC *pDesc,
		__in_xcount_opt(pDesc->MipLevels * pDesc->ArraySize)  const D3D11_SUBRESOURCE_DATA *pInitialData,
		__out_opt  ID3D11Texture2D **ppTexture2D)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE CreateTexture3D( 
		__in  const D3D11_TEXTURE3D_DESC *pDesc,
		__in_xcount_opt(pDesc->MipLevels)  const D3D11_SUBRESOURCE_DATA *pInitialData,
		__out_opt  ID3D11Texture3D **ppTexture3D)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE CreateShaderResourceView( 
		__in  ID3D11Resource *pResource,
		__in_opt  const D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc,
		__out_opt  ID3D11ShaderResourceView **ppSRView)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE CreateUnorderedAccessView( 
		__in  ID3D11Resource *pResource,
		__in_opt  const D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc,
		__out_opt  ID3D11UnorderedAccessView **ppUAView)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE CreateRenderTargetView( 
		__in  ID3D11Resource *pResource,
		__in_opt  const D3D11_RENDER_TARGET_VIEW_DESC *pDesc,
		__out_opt  ID3D11RenderTargetView **ppRTView)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE CreateDepthStencilView( 
		__in  ID3D11Resource *pResource,
		__in_opt  const D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc,
		__out_opt  ID3D11DepthStencilView **ppDepthStencilView)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE CreateInputLayout( 
		__in_ecount(NumElements)  const D3D11_INPUT_ELEMENT_DESC *pInputElementDescs,
		__in_range( 0, D3D11_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT )  UINT NumElements,
		__in  const void *pShaderBytecodeWithInputSignature,
		__in  SIZE_T BytecodeLength,
		__out_opt  ID3D11InputLayout **ppInputLayout)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE CreateVertexShader( 
		__in  const void *pShaderBytecode,
		__in  SIZE_T BytecodeLength,
		__in_opt  ID3D11ClassLinkage *pClassLinkage,
		__out_opt  ID3D11VertexShader **ppVertexShader)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE CreateGeometryShader( 
		__in  const void *pShaderBytecode,
		__in  SIZE_T BytecodeLength,
		__in_opt  ID3D11ClassLinkage *pClassLinkage,
		__out_opt  ID3D11GeometryShader **ppGeometryShader)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE CreateGeometryShaderWithStreamOutput( 
		__in  const void *pShaderBytecode,
		__in  SIZE_T BytecodeLength,
		__in_ecount_opt(NumEntries)  const D3D11_SO_DECLARATION_ENTRY *pSODeclaration,
		__in_range( 0, D3D11_SO_STREAM_COUNT * D3D11_SO_OUTPUT_COMPONENT_COUNT )  UINT NumEntries,
		__in_ecount_opt(NumStrides)  const UINT *pBufferStrides,
		__in_range( 0, D3D11_SO_BUFFER_SLOT_COUNT )  UINT NumStrides,
		__in  UINT RasterizedStream,
		__in_opt  ID3D11ClassLinkage *pClassLinkage,
		__out_opt  ID3D11GeometryShader **ppGeometryShader)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE CreatePixelShader( 
		__in  const void *pShaderBytecode,
		__in  SIZE_T BytecodeLength,
		__in_opt  ID3D11ClassLinkage *pClassLinkage,
		__out_opt  ID3D11PixelShader **ppPixelShader)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE CreateHullShader( 
		__in  const void *pShaderBytecode,
		__in  SIZE_T BytecodeLength,
		__in_opt  ID3D11ClassLinkage *pClassLinkage,
		__out_opt  ID3D11HullShader **ppHullShader)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE CreateDomainShader( 
		__in  const void *pShaderBytecode,
		__in  SIZE_T BytecodeLength,
		__in_opt  ID3D11ClassLinkage *pClassLinkage,
		__out_opt  ID3D11DomainShader **ppDomainShader)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE CreateComputeShader(
		__in  const void *pShaderBytecode,
		__in  SIZE_T BytecodeLength,
		__in_opt  ID3D11ClassLinkage *pClassLinkage,
		__out_opt  ID3D11ComputeShader **ppComputeShader)
	{
		CreateComputeShaderCalled = true;
		CreateComputeShaderLastByteCode = pShaderBytecode;
		CreateComputeShaderLastByteCodeLength = BytecodeLength;
		CreateComputeShaderLastClassLinkage = pClassLinkage;
		*ppComputeShader = CreateComputeShaderFakeResult;
		return CreateComputeShaderFakeHResult;
	}
	bool CreateComputeShaderCalled;
	void const *CreateComputeShaderLastByteCode;
	SIZE_T CreateComputeShaderLastByteCodeLength;
	ID3D11ClassLinkage *CreateComputeShaderLastClassLinkage;
	ID3D11ComputeShader *CreateComputeShaderFakeResult;
	HRESULT CreateComputeShaderFakeHResult;

	virtual HRESULT STDMETHODCALLTYPE CreateClassLinkage( 
		__out  ID3D11ClassLinkage **ppLinkage)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE CreateBlendState( 
		__in  const D3D11_BLEND_DESC *pBlendStateDesc,
		__out_opt  ID3D11BlendState **ppBlendState)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE CreateDepthStencilState( 
		__in  const D3D11_DEPTH_STENCIL_DESC *pDepthStencilDesc,
		__out_opt  ID3D11DepthStencilState **ppDepthStencilState)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE CreateRasterizerState( 
		__in  const D3D11_RASTERIZER_DESC *pRasterizerDesc,
		__out_opt  ID3D11RasterizerState **ppRasterizerState)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE CreateSamplerState( 
		__in  const D3D11_SAMPLER_DESC *pSamplerDesc,
		__out_opt  ID3D11SamplerState **ppSamplerState)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE CreateQuery( 
		__in  const D3D11_QUERY_DESC *pQueryDesc,
		__out_opt  ID3D11Query **ppQuery)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE CreatePredicate( 
		__in  const D3D11_QUERY_DESC *pPredicateDesc,
		__out_opt  ID3D11Predicate **ppPredicate)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE CreateCounter( 
		__in  const D3D11_COUNTER_DESC *pCounterDesc,
		__out_opt  ID3D11Counter **ppCounter)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE CreateDeferredContext( 
		UINT ContextFlags,
		__out_opt  ID3D11DeviceContext **ppDeferredContext)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE OpenSharedResource( 
		__in  HANDLE hResource,
		__in  REFIID ReturnedInterface,
		__out_opt  void **ppResource)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE CheckFormatSupport( 
		__in  DXGI_FORMAT Format,
		__out  UINT *pFormatSupport)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE CheckMultisampleQualityLevels( 
		__in  DXGI_FORMAT Format,
		__in  UINT SampleCount,
		__out  UINT *pNumQualityLevels)
	{ throw std::exception("Not implemented"); }

	virtual void STDMETHODCALLTYPE CheckCounterInfo( 
		__out  D3D11_COUNTER_INFO *pCounterInfo)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE CheckCounter( 
		__in  const D3D11_COUNTER_DESC *pDesc,
		__out  D3D11_COUNTER_TYPE *pType,
		__out  UINT *pActiveCounters,
		__out_ecount_opt(*pNameLength)  LPSTR szName,
		__inout_opt  UINT *pNameLength,
		__out_ecount_opt(*pUnitsLength)  LPSTR szUnits,
		__inout_opt  UINT *pUnitsLength,
		__out_ecount_opt(*pDescriptionLength)  LPSTR szDescription,
		__inout_opt  UINT *pDescriptionLength)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE CheckFeatureSupport( 
		D3D11_FEATURE Feature,
		__out_bcount(FeatureSupportDataSize)  void *pFeatureSupportData,
		UINT FeatureSupportDataSize)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE GetPrivateData( 
		__in  REFGUID guid,
		__inout  UINT *pDataSize,
		__out_bcount_opt(*pDataSize)  void *pData)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE SetPrivateData( 
		__in  REFGUID guid,
		__in  UINT DataSize,
		__in_bcount_opt(DataSize)  const void *pData)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE SetPrivateDataInterface( 
		__in  REFGUID guid,
		__in_opt  const IUnknown *pData)
	{ throw std::exception("Not implemented"); }

	virtual D3D_FEATURE_LEVEL STDMETHODCALLTYPE GetFeatureLevel( void)
	{ throw std::exception("Not implemented"); }

	virtual UINT STDMETHODCALLTYPE GetCreationFlags( void)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE GetDeviceRemovedReason( void)
	{ throw std::exception("Not implemented"); }

	virtual void STDMETHODCALLTYPE GetImmediateContext( 
		__out  ID3D11DeviceContext **ppImmediateContext)
	{ throw std::exception("Not implemented"); }

	virtual HRESULT STDMETHODCALLTYPE SetExceptionMode( 
		UINT RaiseFlags)
	{ throw std::exception("Not implemented"); }

	virtual UINT STDMETHODCALLTYPE GetExceptionMode( void)
	{ throw std::exception("Not implemented"); }
};

#endif
